<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html>
<html lang="en">
<c:import url="../common/header.jsp"></c:import>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">

		<c:import url="../common/nav.jsp"></c:import>

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<section class="content-header">
				<h1>
					Page Header <small>Optional description</small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
					<li class="active">Here</li>
				</ol>
			</section>

			<!-- Main content -->
			<section class="content">

				<!-- Your Page Content Here -->
				<div class="row">
					<div class="col-xs-12">
						<div class="box">
							<div class="box-header">
								<div class="btn-group" id="user">
									<a href="${ctx}/manager/account/list/type/2"><button
											type="button" name="all" class="btn btn-info">全部</button></a> <a
										href="${ctx}/manager/account/list/type/0"><button
											type="button" name="unaudit" class="btn btn-info">未审核</button></a>
									<a href="${ctx}/manager/account/list/type/1"><button
											type="button" name="audit_success" class="btn btn-info">审核成功</button></a>
									<a href="${ctx}/manager/account/list/type/-1"><button
											type="button" name="audit_fail" class="btn btn-info">审核失败</button></a>
								</div>
							</div>
							<!-- /.box-header -->
							<div class="box-body">
								<div id="example2_wrapper"
									class="dataTables_wrapper form-inline dt-bootstrap">
									<div class="row">
										<div class="col-sm-6"></div>
										<div class="col-sm-6"></div>
									</div>
									<div class="row">
										<div class="col-sm-12">
											<table id="example2"
												class="table table-bordered table-hover dataTable"
												role="grid" aria-describedby="example2_info">
												<thead>
													<tr role="row">
														<th class="sorting_asc" tabindex="0"
															aria-controls="example2" rowspan="1" colspan="1"
															aria-label="userId: activate to sort column descending"
															aria-sort="ascending">用户id</th>
														<th class="sorting" tabindex="0" aria-controls="example2"
															rowspan="1" colspan="1"
															aria-label="phone: activate to sort column ascending">手机号</th>
														<th class="sorting" tabindex="0" aria-controls="example2"
															rowspan="1" colspan="1"
															aria-label="truename: activate to sort column ascending">真实名字</th>
														<th class="sorting" tabindex="0" aria-controls="example2"
															rowspan="1" colspan="1"
															aria-label="school: activate to sort column ascending">学校</th>
														<th class="sorting" tabindex="0" aria-controls="example2"
															rowspan="1" colspan="1"
															aria-label="register date: activate to sort column ascending">注册时间</th>
														<th class="sorting" tabindex="0" aria-controls="example2"
															rowspan="1" colspan="1"
															aria-label="state: activate to sort column ascending">状态</th>
													</tr>
												</thead>
												<tbody>
													<c:forEach var="account" items="${accountList}">
														<tr role="row" class="odd">
															<td class="sorting_1">${account.userId}</td>
															<td>${account.phone}</td>
															<td>${account.truename}</td>
															<td>${account.school}</td>
															<td>${account.registerDate}</td>
															<td>
																<div class="btn-group">
																	<c:if test="${account.state == -1}">
																		<button type="button" class="btn btn-info">通过</button>
																	</c:if>
																	<c:if test="${account.state == 0}">
																		<button type="button" class="btn btn-info">通过</button>
																		<button type="button" class="btn btn-info btn-danger">否认</button>
																	</c:if>
																	<c:if test="${account.state == 1}">
																		<button type="button" class="btn btn-info btn-danger">否认</button>
																	</c:if>
																</div>
															</td>
														</tr>
													</c:forEach>
												</tbody>
												<tfoot>
													<tr>
														<th rowspan="1" colspan="1">用户id</th>
														<th rowspan="1" colspan="1">手机号</th>
														<th rowspan="1" colspan="1">真实名字</th>
														<th rowspan="1" colspan="1">学校</th>
														<th rowspan="1" colspan="1">注册时间</th>
														<th rowspan="1" colspan="1">状态</th>
													</tr>
												</tfoot>
											</table>
										</div>
									</div>
								</div>
							</div>
							<!-- /.box-body -->
						</div>
						<!-- /.box -->

						<div class="box">
							<div class="box-header">
								<h3 class="box-title">Data Table With Full Features</h3>
							</div>
							<!-- /.box-header -->
							<div class="box-body">
								<div id="example1_wrapper"
									class="dataTables_wrapper form-inline dt-bootstrap">
									<div class="row">
										<div class="col-sm-12">
											<table id="example1"
												class="table table-bordered table-striped dataTable"
												role="grid" aria-describedby="example1_info">
												<thead>
													<tr role="row">
														<th class="sorting_asc" tabindex="0"
															aria-controls="example1" rowspan="1" colspan="1"
															style="width: 297px;"
															aria-label="userId: activate to sort column descending"
															aria-sort="ascending">用户Id</th>
														<th class="sorting" tabindex="0" aria-controls="example1"
															rowspan="1" colspan="1" style="width: 360px;"
															aria-label="Browser: activate to sort column ascending">Browser</th>
														<th class="sorting" tabindex="0" aria-controls="example1"
															rowspan="1" colspan="1" style="width: 321px;"
															aria-label="Platform(s): activate to sort column ascending">Platform(s)</th>
														<th class="sorting" tabindex="0" aria-controls="example1"
															rowspan="1" colspan="1" style="width: 256px;"
															aria-label="Engine version: activate to sort column ascending">Engine
															version</th>
														<th class="sorting" tabindex="0" aria-controls="example1"
															rowspan="1" colspan="1" style="width: 188px;"
															aria-label="CSS grade: activate to sort column ascending">CSS
															grade</th>
													</tr>
												</thead>
												<tbody>
													<tr role="row" class="odd">
														<td class="sorting_1">Gecko</td>
														<td>Firefox 1.0</td>
														<td>Win 98+ / OSX.2+</td>
														<td>1.7</td>
														<td>A</td>
													</tr>
													<tr role="row" class="even">
														<td class="sorting_1">Gecko</td>
														<td>Firefox 1.5</td>
														<td>Win 98+ / OSX.2+</td>
														<td>1.8</td>
														<td>A</td>
													</tr>
												</tbody>
												<tfoot>
													<tr>
														<th rowspan="1" colspan="1">userId</th>
														<th rowspan="1" colspan="1">Browser</th>
														<th rowspan="1" colspan="1">Platform(s)</th>
														<th rowspan="1" colspan="1">Engine version</th>
														<th rowspan="1" colspan="1">CSS grade</th>
													</tr>
												</tfoot>
											</table>
										</div>
									</div>
								</div>
							</div>
							<!-- /.box-body -->
						</div>
						<!-- /.box -->
					</div>
					<!-- /.col -->
				</div>
				<!-- /.row -->
			</section>
			<!-- /.content -->
		</div>
		<!-- /.content-wrapper -->

		<%-- 		<c:import url="../common/footer.jsp"></c:import> --%>

		<!-- jQuery 2.2.3 -->
		<script src="${ctx}/plugins/jQuery/jquery-2.2.3.min.js"></script>
		<!-- Bootstrap 3.3.6 -->
		<script src="${ctx}/bootstrap/js/bootstrap.min.js"></script>
		<!-- DataTables -->
		<script src="${ctx}/plugins/datatables/jquery.dataTables.min.js"></script>
		<script src="${ctx}/plugins/datatables/dataTables.bootstrap.min.js"></script>
		<!-- SlimScroll -->
		<script src="${ctx}/plugins/slimScroll/jquery.slimscroll.min.js"></script>
		<!-- FastClick -->
		<script src="${ctx}/plugins/fastclick/fastclick.js"></script>
		<!-- AdminLTE App -->
		<script src="${ctx}/dist/js/app.min.js"></script>
		<!-- AdminLTE for demo purposes -->
		<script src="${ctx}/dist/js/demo.js"></script>

		<!-- page script -->
		<script>
			$(function() {
				$('#example1').DataTable({
					"paging" : true,
					"lengthChange" : false,
					"searching" : false,
					"ordering" : true,
					"info" : true,
					"autoWidth" : false
				});
				$("#example2").DataTable();

				/* 获取 button */

			});
		</script>
	</div>

</body>
</html>
